package com.skillworld.webapp.model.courseservice;

import com.skillworld.webapp.model.course.Course;
import com.skillworld.webapp.model.enrollment.Enrollment;

public class CourseInfo 
{
    private Course course;
    private Enrollment enrollment;
    private boolean enrolled;
    
    
    public CourseInfo(Course course, Enrollment enrollment)
    {
        this.course = course;
        this.enrollment = enrollment;
        this.enrolled = (enrollment != null);
    }


    public Course getCourse() 
    {
        return course;
    }

    public void setCourse(Course course)
    {
        this.course = course;
    }

    public Enrollment getEnrollment()
    {
        return enrollment;
    }

    public void setEnrollment(Enrollment enrollment)
    {
        this.enrollment = enrollment;
        this.enrolled = (enrollment != null);
    }

    public boolean isEnrolled(){
        return enrolled;
    }
}
